imcontextwayland: Fix copy/paste error
authorBenjamin Otte <otte@redhat.com>
Thu, 5 Mar 2020 02:57:53 +0000 (03:57 +0100)
committerBenjamin Otte <otte@redhat.com>
Thu, 5 Mar 2020 03:03:02 +0000 (04:03 +0100)
gtk/gtkimcontextwayland.c

index 9511ae6978b1bb157e47994e05ca8472003f3195..393f9b91c6782c3cdaf3d55d553f3b33cf2c215d 100644 (file)
@@ -321,7 +321,7 @@ notify_surrounding_text (GtkIMContextWayland *context)
             }
 
           mid = MIN (context->surrounding.cursor_idx,
-                     context->surrounding.cursor_idx) + (cursor_len / 2);
+                     context->surrounding.anchor_idx) + (cursor_len / 2);
           a = MAX (0, mid - (MAX_LEN / 2));
           b = MIN (MAX_LEN, mid + (MAX_LEN / 2));